<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="java.util.*,erp.education.server.db.entites.finance.FeeGroup"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>School Register Form</title>
 <link rel="stylesheet" href="css/default.css"/>
<link rel="stylesheet" href="css/<%=session.getAttribute("cssView")%>/jquery-ui.css"/>
 <script type="text/javascript">
 $(document).ready(function(){
 defaultFunction();
 ui();
 jGrid();
 
 })
 </script>
<script type="text/javascript" src="js/finance/master/feeheads.js"></script>
</head>

<body>
<%
List result=(List)request.getAttribute("result");
List<FeeGroup> feeGroups=(List<FeeGroup>)result.get(0);
List<Object[]> gridData=(List<Object[]>)result.get(1);
%>
<div class="pageHeader">Fee Heads </div>
<div class="content">
 <div class="form">
<form name="feeHeadDetails" action="saveSchoolDetails">

<table class="form" cellpadding="0" cellspacing="0" >
<tr >
  <td >Name : </td>
  
  <td ><input type="text" name="feeHeadName" notNull msg="Enter branch name" />
    <input name="feeCode" value="-1" class="hide"/></td></tr>
<tr>
  <td width="105">Type   : </td>
  <td width="238"><select name="feeHeadType" notNull msg="Select fee head type">
  <option value="-1" selected="selected">Select</option>
   <option value="M">MONTHLY</option>
   <option value="O">ONCE</option>
   <option value="Y">YEARLY</option>
  </select></td>
</tr>
  <tr>
  <td width="144">Group:</td>
  <td width="94"><select name="groupId" notNull msg="Select fee head type">
  <option value="-1" selected="selected">Select</option>
  <%for(FeeGroup feeGroup:feeGroups){%>
   <option value="<%=feeGroup.getGroupId()%>"><%=feeGroup.getGroupName()%></option>
  <%}%>
   
  </select></td><td width="1"></td></tr>

  <tr ><td colspan="2" ><label><input type="checkbox" name="refundable" />
    Refundable</label>  <label ><input type="checkbox" name="taxExemption"  />
   Tax Exemption </label></td></tr>
<tr><td colspan="2" align="right"><input type="button" value="Save" onclick="feeheads.saveupdate();" /><input type="reset" value="Clear" /></td></tr>
</table>

</form> 
</div>
<br />
<div class="grid_holder">
<a href="#" navigate onclick="return false" style="text-decoration:none" >
<table navigate class="grid" cellpadding="0" cellspacing="0" onDelete="branchs.removeBranch()" onEdit="branchs.editBranch()" searchAction="feeheads.action">
<thead>
<tr>
 <th></th>
<th class="hide" >Code</th>
 <th class="hide"></th>
<th>Type</th>
<th class="hide" >GroupId</th>
<th  >Group </th>
<th>Name </th>
<th>Refundable </th>
<th>Tax Exemption </th>
 
<th></th>
<th></th>
</tr>
</thead>

<tbody>
<%
 
for(Object[] row:gridData){
%>
<tr active='N' >
 <td>&nbsp;&nbsp;</td>
  <td class="hide" field="feeCode" edit="false"><%=row[0] %></td>
  
  <td field="feeHeadType" class="hide"><%=row[1] %></td>
  <% 
  Map feeTypeName=new HashMap();
  feeTypeName.put("O","ONCE");
    feeTypeName.put("Y","YEARLY");
  feeTypeName.put("V","VARY");
	  feeTypeName.put("M","MONTHLY");
  %>
  
  
  <td><%=feeTypeName.get(row[1]+"")%> </td>
  <td   field="groupId" class="hide" ><%=row[2] %></td>
  <td field="groupName"><%=row[3] %></td>
   <td field="feeHeadName"><%=row[4] %></td>
     <td field="refundable"><%=row[5] %></td>
  <td field="taxExemption"><%=row[6] %></td>
  
  <td width="16"><span class="ui-icon ui-icon-pencil"></span></td>
  <td width="16"><span class="ui-icon ui-icon-trash"></span></td>
</tr>
 <%} %>
</tbody></table>
</a>
</div>
</div>
</body>
</html>
